import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
// import { ValidationProvider, extend, localize } from 'vee-validate'
// import axios from 'axios'
// import cn from 'vee-validate/dist/locale/zh_CN.json'
// import * as rules from 'vee-validate/dist/rules'
// import './local/index'
import '@/util/veevalidate.js'
import Alert from './components/modules/alert/index'
import Pop from './components/modules/pop/index'
import filters from '@/util/filter'
import directives from '@/util/directive'

Object.keys(filters).forEach((item) => {
  Vue.filter(item, filters[item])
})
Object.keys(directives).forEach((item) => {
  Vue.directive(item, directives[item])
})
Vue.config.productionTip = false
Vue.use(Alert)
Vue.use(Pop)
// Object.keys(rules).forEach(rule => {
//   extend(rule, rules[rule])
// })
// localize('zh-CN')
// Vue.component('ValidationProvider', ValidationProvider)

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
